package com.h3bpm.web.organization.dao.impl;


import com.h3bpm.web.common.utils.SqlUtil;
import com.h3bpm.web.organization.dao.DepartmentDao;
import data.DataRow;
import data.DataTable;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @wjq
 * @date2019/8/29
 */
@Repository
public class DepartmentDaoImpl  implements DepartmentDao {


    @Override
    public List<DataRow> getDepartmentList() {
    try {
        String sql="select * From dbo_unit";

        DataTable table = SqlUtil.doQuery(sql);
        List<DataRow> entityRows = table.getEntityRows();
        return entityRows;
    } catch (Exception e) {
        e.printStackTrace();
    }
     return null;
    }

}
